<#import "spring.ftl" as s/>
<#macro layout>
<div class="widget color-blue" id="${userPortlet.uid}">
  <div class="widget-head">
    <h3>${userPortlet.name }</h3>
  </div>
  <div id="${userPortlet.uid}-content" class="widget-content">
    <#nested>     
  </div>
  <script type="text/javascript">
  $(document).ready(function(){  
    $("#${userPortlet.uid}").bind("onReload", function (event) {
    
    });
    
    $("#${userPortlet.uid}").bind("onEdit", function (event, name) {
      if(name!=null && ""!=name)
      {
      $.webtools.ajax({
        url: "${contextPath}/assistant/userPortlet/updateName.json",
        params: {"id": "${userPortlet.id}", "name": name},
        isShowLoading: false,
        success: function(reply) {
          
        }
      }); 
    } 
    });   
  
    $("#${userPortlet.uid}").bind("onRemove", function (event) {    
    $.webtools.ajax({
      url: "${contextPath}/assistant/userPortlet/delete.json",
      params: {"id": "${userPortlet.id}"},
      isShowLoading: false,
      success: function(reply) {
        
      }
    });   
    }); 
  });
  </script>
</div>

</#macro> 